<style scoped lang="less">
.page-index {
  overflow: auto;
}
.page-box {
  text-align: center;
  margin: 20px auto;
}
</style>
<template>
    <div class="page-index">
        <i-table stripe  border  :content="self" :columns="columns1" :data="data1"></i-table>
    </div>
</template>
<script>
export default {
  data() {
    return {
      self: this,
      columns1: [
        {
          title: "工号",
          key: "number"
        },
        {
          title: "姓名",
          key: "name"
        },
        {
          title: "消息",
          key: "msg"
        }
      ],
      data1: []
    };
  },
  mounted () {
    this.init();
  },
  methods: {
    init() {
      var self = this;
      var req = this.Axios.get(this.Interface.chatList);

      req.then(res => {
        var data = res.data;
        console.log(data);
        if (data.success) {
          var count = data.data.count;
          this.pageTotal = count;
          this.data1 = data.data.rows;
        } else {
          this.$Message.error(data.msg);
        }
      });
    }
  }
};
</script>
